Component({
  /**
   * Component properties
   */
  properties: {
    currentPage: {
      type: String,
      value: ''
    }
  },

  /**
   * Component initial data
   */
  data: {
    tabs: [
      { name: '奶茶日历', pagePath: '/pages/index/index' },
      { name: '添加奶茶', pagePath: '/pages/addTea/addTea' },
      { name: '赛博奶茶', pagePath: '/pages/drinkTea/drinkTea' },
      { name: '统计奶茶', pagePath: '/pages/statistics/statistics' },
      { name: '奶茶地图', pagePath: '/pages/provinceMap/provinceMap' }
    ]
  },

  /**
   * Component methods
   */
  methods: {
    navigateTo(e) {
      const url = e.currentTarget.dataset.path;
      wx.switchTab({
        url,
        fail() {
          wx.navigateTo({
            url
          });
        }
      });
    }
  }
}) 